#ifndef __GD32_ADC_H__
#define __GD32_ADC_H__


#include "gd32f1x0.h"

#include "Config.h"

//@ ADC

#define BAT_CHECK		GPIO_PIN_7
#define ADC_IO			GPIOA

#define BAT_RES1   100000   
#define BAT_RES2   100000
#define BAT_RATIO  (BAT_RES1+BAT_RES2)/BAT_RES2

#define RX_RES1    15000000
#define RX_RES2    150000
#define RX_RATIO   (RX_RES1+RX_RES2)/RX_RES2

#define TX_RES1    15000000
#define TX_RES2    150000
#define TX_RATIO   (TX_RES1+TX_RES2)/TX_RES2

void ADC_User_Init(void);
void ADC_Math(void);
//vu16 TXHV_ADC(void);

//vu16 NCT_ADC(void);
//vu16 RXHV_ADC(void);
//s16 ADC_ToTemp(vu16 temp_ad)
extern u16 Bat_test;
extern u8 Bat_flag;


#endif
